The invention relates to the decoding of compressed images and in particular to the decoding of images which are compressed according to an MPEG standard. More particularly, the invention relates to the exchange of data between a circuit for decoding the images and a dynamic memory.
According to various image compression standards, especially MPEG (xe2x80x9cMotion Pictures Experts Groupxe2x80x9d), the images are decoded in blocks, or macroblocks, generally of 16xc3x9716 pixels. The macroblocks can be of various formats. The most commonly used format is the one termed 4:2:0 according to which each macroblock contains four blocks of 8xc3x978 luminance pixels of eight bits and two blocks of 8xc3x978 chrominance pixels of eight bits.
The images processed are essentially of three types, namely an xe2x80x9cintraxe2x80x9d type, a xe2x80x9cpredictedxe2x80x9d type and a xe2x80x9cbidirectionalxe2x80x9d type. The person skilled in the art is aware that the macroblocks of an xe2x80x9cintraxe2x80x9d image do not undergo any motion compensation. In a predicted image, each macroblock can undergo a motion compensation which includes combining the macroblock with another macroblock, the xe2x80x9cpredictorxe2x80x9d, fetched from a previously decoded image. Each macroblock of a bidirectional image can undergo a motion compensation which includes combining the macroblock with two other predictor macroblocks, fetched respectively from two previously decoded images. The positions of the predictor macroblocks are determined by motion vectors.
An MPEG decoding system, referred to more simply hereafter as an xe2x80x9cMPEG decoderxe2x80x9d, must communicate with a dynamic memory to carry out the decoding of the images, particularly those requiring the contents of at least one previously decoded image stored in this memory for their decoding. Such a memory plays an essential role in the decoding of these images. Now, with current production technologies, the following are produced within one and the same chip: an MPEG decoder, processing means comprising a microprocessor and intended to perform channel search operations when the assembly is built into a satellite decoder for example, as well as a circuit for generating graphical elements which are to be inlaid onto images and correspond for example to interactive menus called up by a remote control and allowing the user to perform adjustments on certain operating parameters of their television or of their reception device.
Now, all these elements share the same dynamic memory. It is therefore especially important to be able to reduce the memory passband used, i.e. the number of clock cycles during which this memory is accessed by one of the elements so as to perform a particular phase of processing, and in order to be able to leave some time available so that the other elements can access this memory before the first element begins another phase of processing.
An object of the invention is to achieve this goal at the level of the MPEG decoder. Stated otherwise, it is an object of the invention to minimize the time periods during which the memory is accessed by the MPEG decoder, in particular while decoding the images.
The invention therefore proposes a macroblock-wise method of decoding an inbound image coded by compressed data, this image being of the type requiring the contents of at least one previously decoded image stored in a memory for its decoding. According to a general characteristic of the invention, the memory is a random-access synchronous dynamic memory comprising two memory banks organized into pages (SDRAM memory). Page accesses (memory accesses) to the memory are performed, simultaneously opening two pages situated respectively in the two memory banks so as to store respectively in the two open pages, two macroblocks belonging respectively to two consecutive rows of macroblocks of the previously decoded image and to the same column of macroblocks of the previously decoded image. The decoding of each macroblock of the inbound image then comprises the extracting from the memory of a predictor macroblock of a size greater than or equal to that of the macroblocks of the image stored in memory. This extraction comprises accessing pages of the memory so as to open simultaneously with each page access, two pages situated respectively in the two memory banks and respectively containing two macroblocks belonging respectively to two consecutive rows of macroblocks and to the same column of macroblocks of the stored image. A columnwise reading of some of the pixels of the two macroblocks accessed during the page access is then performed, so as to obtain some of the corresponding pixels of the predictor macroblock.
The invention thus makes it possible to reduce the number of page accesses to the memory, and consequently the number of clock cycles required for opening these pages. The invention consequently allows an appreciable reduction in the memory passband used.
Although the invention applies to the decoding of any image of the type requiring the contents of at least one previously decoded image for its decoding, for example a predicted image, the invention applies particularly advantageously to the decoding of an image of a bidirectional type requiring the contents of two previously decoded images stored in the memory for its decoding, when this bidirectional image is decoded on the fly. This is because the on-the-fly decoding of bidirectional images is performed by two successive decodings of the image without storing the reconstructed image in the image memory. More precisely, each bidirectional image is decoded a first time while a first frame of the image is displayed directly, and a second time while a second frame of the image is displaced directly, the two frames corresponding to lines of different parities of the image.
The on-the-fly decoding of bidirectional images makes it possible to reduce the size of the SDRAM memory used, and the decrease in the number of page accesses to the SDRAM memory here takes on a definite advantage by virtue of the two successive decodings of the bidirectional image.
The subject of the invention is also a device for processing inbound images, coded by compressed data, this device comprising decoding means able to decode each current inbound image macroblock by macroblock, a memory linked to the decoding means and able to store at least some of the decoded images, and control means linked to the decoding means and to the memory. According to a general characteristic of the invention, the memory is a random-access synchronous dynamic memory comprising two memory banks organized into pages. The control means are able to perform page accesses to the memory simultaneously opening two pages situated respectively in the two memory banks so as to store respectively in the two open pages, two macroblocks belonging respectively to two consecutive rows of macroblocks and to the same column of macroblocks of the previously decoded image. The control means are able to extract from the memory, for the decoding of each macroblock of the inbound image, a predictor macroblock of a size greater than or equal to that of the macroblocks of the image stored in memory, this extraction comprising page accesses to the memory so as to open simultaneously with each page access, two pages situated respectively in the two memory banks and respectively containing two macroblocks belonging respectively to two consecutive rows of macroblocks of the stored image and to the same column of macroblocks of this stored image. The memory then delivers columnwise some of the pixels of the two macroblocks accessed during the page access, so as to obtain some of the corresponding pixels of the predictor macroblock.